package com.qyhl.webtv.commonlib.entity.act;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created  on 2017/12/21.
 * @author
 * 活动投票
 */

public class ActVoteBean implements Parcelable {

    /**
     * ID
     */
    private Integer id;

    /**
     * 投票规则
     */
    private Integer voteRule;

    /**
     * 活动ID
     */
    private Integer activityId;

    /**
     * 开始时间
     */
    private String startTime;

    /**
     * 结束时间
     */
    private String endTime;

    /**
     * 票数
     */
    private int voteNum;

    private int extraRule;

    private int perReceiver;

    private int perMinVote;

    private int minCoin;

    private int maxCoin;

    public int getExtraRule() {
        return extraRule;
    }

    public void setExtraRule(int extraRule) {
        this.extraRule = extraRule;
    }

    public int getPerReceiver() {
        return perReceiver;
    }

    public void setPerReceiver(int perReceiver) {
        this.perReceiver = perReceiver;
    }

    public int getPerMinVote() {
        return perMinVote;
    }

    public void setPerMinVote(int perMinVote) {
        this.perMinVote = perMinVote;
    }

    public int getMinCoin() {
        return minCoin;
    }

    public void setMinCoin(int minCoin) {
        this.minCoin = minCoin;
    }

    public int getMaxCoin() {
        return maxCoin;
    }

    public void setMaxCoin(int maxCoin) {
        this.maxCoin = maxCoin;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getVoteRule() {
        return voteRule;
    }

    public void setVoteRule(Integer voteRule) {
        this.voteRule = voteRule;
    }

    public Integer getActivityId() {
        return activityId;
    }

    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getVoteNum() {
        return voteNum;
    }

    public void setVoteNum(int voteNum) {
        this.voteNum = voteNum;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeValue(this.voteRule);
        dest.writeValue(this.activityId);
        dest.writeString(this.startTime);
        dest.writeString(this.endTime);
        dest.writeInt(this.voteNum);
        dest.writeInt(this.extraRule);
        dest.writeInt(this.perReceiver);
        dest.writeInt(this.perMinVote);
        dest.writeInt(this.minCoin);
        dest.writeInt(this.maxCoin);
    }

    public ActVoteBean() {
    }

    protected ActVoteBean(Parcel in) {
        this.id = (Integer) in.readValue(Integer.class.getClassLoader());
        this.voteRule = (Integer) in.readValue(Integer.class.getClassLoader());
        this.activityId = (Integer) in.readValue(Integer.class.getClassLoader());
        this.startTime = in.readString();
        this.endTime = in.readString();
        this.voteNum = in.readInt();
        this.extraRule = in.readInt();
        this.perReceiver = in.readInt();
        this.perMinVote = in.readInt();
        this.minCoin = in.readInt();
        this.maxCoin = in.readInt();
    }

    public static final Parcelable.Creator<ActVoteBean> CREATOR = new Parcelable.Creator<ActVoteBean>() {
        @Override
        public ActVoteBean createFromParcel(Parcel source) {
            return new ActVoteBean(source);
        }

        @Override
        public ActVoteBean[] newArray(int size) {
            return new ActVoteBean[size];
        }
    };
}
